<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>JavaScript 常量类型</title>
</head>
<body>

<script type="text/javascript">
    var i1 = 1;//number
    var i2 = 'abc';//string
    var i3 = new Object();//object
    var i4 = null;//object
    var i5 = false;//boolean
    var i6;//undefined
    //在浏览器控制台打印想要的值
    console.log("在浏览器控制台打印值");
    console.log(typeof i1);
    console.log(typeof i2);
    console.log(typeof i3);
    console.log(typeof i4);
    console.log(typeof i5);
    console.log(typeof i6);
    console.log(i1 / i2);
    //JavaScript 变量可以在多种类型之间切换
    i1 = 'ABCDEFG';
    console.log(i1);
    i1 = true;
    console.log(i1);
    i1 = new Object();
    console.log(i1);
</script>
</body>
</html>